﻿using LS.FrmUI.Dal;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace LS.FrmUI
{
    public partial class FrmSysSetting : Form
    {
        SysSettingDal dal = new SysSettingDal();

        public FrmSysSetting()
        {
            InitializeComponent();
            DataTable dt = dal.GetDTFromSysSetting();
            try
            {
                txtSOP.Text=Convert.ToString(dt.Rows[0]["SOP"]);
                txtPrintTip.Text = Convert.ToString(dt.Rows[0]["PrintTip"]);
            }
            catch (Exception)
            {
            }
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            bool b= dal.UpdateData(txtSOP.Text, txtPrintTip.Text);
            if (b)
            {
                MessageBox.Show("修改完成");
            }
            else
            {
                MessageBox.Show("修改失败。。");
            }
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
